Skip to content

npl/linux: Honor finite event queue timeouts - #2293

Merged
sjanc merged 1 commit into
apache:masterfrom
lewisjoshua1986:codex/linux-eventq-timeout
Sep 9, 2026
Merged

npl/linux: Honor finite event queue timeouts#2293
sjanc merged 1 commit into
apache:masterfrom
lewisjoshua1986:codex/linux-eventq-timeout

Conversation

@lewisjoshua1986

Copy link
Copy Markdown
Contributor

The Linux queue currently treats every nonzero timeout as an indefinite condition wait. An empty queue therefore never returns when a caller requests a finite timeout.

Use a CLOCK_MONOTONIC condition variable and a normalized absolute deadline for finite waits. Reuse the deadline after spurious wakeups and preserve nonblocking reads and BLE_NPL_TIME_FOREVER behavior.

Add a watchdog-bounded regression covering empty-queue expiration, queued events, producer wakeups, and reuse after timeout. Register it in the Linux NPL test target.

The Linux queue currently treats every nonzero timeout as an
indefinite condition wait. An empty queue therefore never returns
when a caller requests a finite timeout.

Use a CLOCK_MONOTONIC condition variable and a normalized absolute
deadline for finite waits. Reuse the deadline after spurious wakeups
and preserve nonblocking reads and BLE_NPL_TIME_FOREVER behavior.

Add a watchdog-bounded regression covering empty-queue expiration,
queued events, producer wakeups, and reuse after timeout. Register
it in the Linux NPL test target.
@sjanc
sjanc merged commit 613761c into apache:master Sep 9, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants